package com.orhon.smartcampus.modules.systemctl.dao;

import java.util.List;
import java.util.Map;

import org.hibernate.Query;
import org.hibernate.Session;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.orhon.smartcampus.basicComponents.baseDao.BaseDaoImpl;
import com.orhon.smartcampus.modules.systemctl.entity.Modules;

@Component
public class ModulesDao extends BaseDaoImpl<Modules> {

    @Transactional
    public List<Map> getModulesBySchool(Long school_Id){
        Session session = this.getSession();
        Query query = session.createSQLQuery("select * from systemctl_modules_school_relations where school_id = " + school_Id);
        return query.list();
    }

}
